//
//  UserVC.m
//  XTeng
//
//  Created by 周成龙 on 16/8/12.
//  Copyright © 2016年 ZCL. All rights reserved.
//

#import "UserVC.h"
#import "SDAutoLayout.h"
@interface UserVC ()

@end

@implementation UserVC

- (void)viewDidLoad {
    [super viewDidLoad];

    // Do any additional setup after loading the view.
    [self baseUI];
}
- (void)baseUI
{
    UIImageView * bg = [[UIImageView alloc]initWithFrame:self.view.bounds];
    bg.image = [UIImage imageNamed:@"侧栏背景"];
    [self.view addSubview:bg];
    
    UIButton * headBtn = [UIButton new];
    [headBtn setTitleColor:[UIColor whiteColor] forState:0];
    [headBtn setTitle:@"老师:白岩百" forState:0];
    headBtn.imageView.layer.borderWidth = 2;
    headBtn.imageView.layer.borderColor = [UIColor whiteColor].CGColor;
    headBtn.imageView.image = [UIImage imageNamed:@"侧栏背景"];
    [self.view addSubview:headBtn];
    headBtn.sd_layout.topSpaceToView(self.view,50).centerXEqualToView(self.view).widthRatioToView(self.view,0.3f).heightEqualToWidth();
    headBtn.imageView.sd_layout.centerXEqualToView(headBtn).topEqualToView(headBtn).heightRatioToView(headBtn,0.7f).widthEqualToHeight();
//    headBtn.imageView.sd_cornerRadiusFromWidthRatio = @0.5f;
    
    headBtn.titleLabel.sd_layout.leftEqualToView(headBtn).rightEqualToView(headBtn).topSpaceToView(headBtn.imageView,0).bottomEqualToView(headBtn);
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}




@end
